package com.lei.design.decorator.coffee;

import com.lei.design.decorator.coffee.condiment.Milk;
import com.lei.design.decorator.coffee.condiment.Soy;
import com.lei.design.decorator.coffee.type.HouseBlend;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/16 11:01
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        HouseBlend houseBlend = new HouseBlend();
        Milk milk = new Milk(houseBlend);
        System.out.println("milk+coffee:"+milk.cost());
        System.out.println(milk.getDescription());
        System.out.println("=============");
        Soy soy = new Soy(milk);
        System.out.println("soy+milk+coffee:"+soy.cost());
        System.out.println(soy.getDescription());
        System.out.println("=============");
        Milk milk1 = new Milk(soy);
        System.out.println("soy+milk*2+coffee:"+milk1.cost());
        System.out.println(milk1.getDescription());
    }
}
